<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
	<link href="../img/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    


    <script>
        // 设置变量接受和
        var sum = 0

        // 循环语句找出偶数
     for(var i = 1;i <= 100;i++){
         if(i % 2 == 0){
             sum += i
         }
     }

     console.log(sum);
     alert(sum)
     
    </script>
</body>
</html>